<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <%@include file="/include/meta.jsp"%>
    <base href="<%=basePath%>">
	<title>在线图书馆-上传</title>
	<link rel="stylesheet" type="text/css" href="css/default.css" />
	<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
	
	<script type="text/javascript">
		function addKeyWord(obj){
			var t=$(obj).parents("table:first");
			var tr=$(obj).parents("tr:first");
			t.find("tr:last").before('<tr><td><input type="text" name="keyWords" /></td></tr>');
			tr.children(":first").attr("rowspan",t.find("input[name='keyWords']").length);
		}
	</script>
</head>
<body>
	<form action="view!upload.action" method="post" enctype="multipart/form-data">
		<table style="width:98%">
			<tr>
				<th style="width:50px">文件</th>
				<td><input type="file" name="upload" /></td>
			</tr>
			<tr>
				<th>摘要</th>
				<td>
					<textarea name="summary" rows="10" cols="100"></textarea>
				</td>
			</tr>
			<tr>
				<th>关键字</th>
				<td>
					<input type="text" name="keyWords">
					<label onclick="addKeyWord(this);">
						<img alt="" src="image/add.png">添加关键字
					</label>
				</td>
			</tr>
			<tr>
				<td colspan="2" style="text-align: center;">
					<input type="submit">
				</td>
			</tr>
		</table>
   	</form>
</body>
</html>